package user

import (
	"time"
)

type User struct {
	Id          uint   `gorm:"AUTO_INCREMENT"`
	UserName    string `gorm:"size:50;unique_index"`
	Age         int    `gorm:"size:3"`
	Birthday    *time.Time
	Email       string `gorm:"type:varchar(50);unique_index"`
	Password    string `gorm:"type:varchar(25)"`
	PhoneNumber string `gorm:"size:50;unique_index"`
	Status      int    `gorm:"size:1"`
}

type RegisterCommand struct {
	Username    string `json:"username"`
	Agreement   bool   `json:"agreement"`
	Password    string `json:"password"`
	PhoneNumber string `json:"phoneNumber"`
}

type LoginCommand struct {
	Username string `json:"username"`
	Password string `json:"password"`
}
